home *** CD-ROM | disk | FTP | other *** search
- global hasClicked
-
- on drawAllResponses
- global gResponseOrder, gCurQuad, gScreenMode
- if getaProp(gScreenMode, #TXTRESP) <> #NONE then
- showTextPuppets()
- end if
- if getaProp(gScreenMode, #PCTRESP) <> #NONE then
- set base to getQuadBase(gCurQuad)
- repeat with i = 0 to 3
- set index to value(char i + 1 of gResponseOrder)
- setResponsePict(i, base + index - 1)
- end repeat
- end if
- puppetTransition(7, 0, 128, 1)
- updateStage()
- end
-
- on giveResponse which
- global gPage, gResponseOrder, gDictNum, gPathList, gScreenMode, gNormSize, gDictMode, gHasPressed
- set index to value(char which of gResponseOrder) + ((gPage - 1) * 4)
- if gHasPressed = 0 then
- if isDict() then
- hideTextPuppets()
- hide6()
- if (gDictMode = #CLICKPICT) and (gDictNum = 0) then
- hideDict()
- else
- if which <> gDictNum then
- hideDict()
- updateStage()
- showDict(which)
- set gDictNum to which
- end if
- end if
- end if
- if gHasPressed = 0 then
- setPos6(2 + which - 1)
- if ((getaProp(gScreenMode, #TXTRESP) = #NONE) and (getaProp(gScreenMode, #mode) = "A")) or (isDict() and (gDictMode = #CLICKPICT)) then
- alignResponse(which, gResponseOrder, gPage, gNormSize)
- setBorderHighlight("highlight pict/text resp")
- setTextPuppetPos(which)
- else
- if getaProp(gScreenMode, #SCREEN) = #TYPE2 then
- setBorderHighlight("highlight text resp")
- else
- setBorderHighlight("highlight no snd resp")
- end if
- end if
- updateStage()
- end if
- if gHasPressed = 0 then
- if getaProp(gScreenMode, #SNDRESP) <> #NONE then
- set fname to makeImagePath(gPathList, #sound, index)
- sound playFile 1, fname
- updateStage()
- end if
- set nextTime to the ticks + 60
- repeat while soundBusy(1) and not (the mouseDown)
- end repeat
- end if
- if not isDict() then
- hide6()
- if (getaProp(gScreenMode, #TXTRESP) = #NONE) and (getaProp(gScreenMode, #mode) = "A") then
- hideTextPuppet(which)
- end if
- end if
- end if
- hideOverlay()
- updateStage()
- end
-
- on hideAllResponses
- global gScreenMode
- if getaProp(gScreenMode, #PCTRESP) <> #NONE then
- blankResponsePicts()
- end if
- if getaProp(gScreenMode, #TXTRESP) <> #NONE then
- hideTextPuppets()
- end if
- puppetTransition(7, 0, 128, 1)
- updateStage()
- end
-